<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%
	String basePath = request.getContextPath();
	String path = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+basePath+"/";
	request.setAttribute("path",path);
%>
<!doctype html>
<html>
<head>
	<meta charset="utf-8">
	<meta name="viewport" content="initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no"/>
	<meta name="format-detection" content="telephone=no,address=no,email=no"/>
	<meta name="keywords" content="" />
	<meta name="description" content="" />
	<title>新增收货地址</title>
	<script type="text/javascript" src="${path}/mobileTerminal/js/jquery.js"></script>
	<link href="${path}/mobileTerminal/css/style.css" rel="stylesheet" media="all">
	<link rel="shortcut icon" href="${path}/mobileTerminal/img/favicon.png">
</head>
<script>
    function checkForms(form) {
        if (form.addressee.value == "" || form.addressee.value == null) {
            alert("收件人必须填!");
            return false;
        }
        if (form.addressPhone.value == "" || form.addressPhone.value == null) {
            alert("联系电话必须填!");
            return false;
        }
        if (form.zipCode.value == "" || form.zipCode.value == null) {
            alert("邮编必须填!");
            return false;
        }
        if (form.detailed.value == "" || form.detailed.value == null) {
            alert("收货地址必须填!");
            return false;
        }
        return true;
    }
</script>
<body class="hu_shopping">
	<header>
		<div class="headerwrap">
			<div class="header_wrap">
				<a href="javascript:history.go(-1);" class="return_last">返回</a>
				<h1>新增收货地址</h1>
			</div>
		</div>
	</header><!-- header -->
	<div class="content_wrap" id="newadd_wrap">
		<form id="form1" name="form1" method="post" action="${path}/SaveAddress" onsubmit="return checkForms(this)">
		<input name="userId" id="userId" value="${userId}" style="display: none">
		<div class="newaddress">
			<div class="newaddress_txt">
				<p class="newadd_name">
					<span class="newadd_tl fl">收件人</span>
					<span class="newadd_input fl"><input class="" name="addressee" id="addressee" type="text"></span>
					<span class="clear"></span>
				</p>
				
				<p class="newadd_phone">
					<span class="newadd_tl fl">联系电话</span>
					<span class="newadd_input fl"><input class="" name="addressPhone" id="addressPhone" type="text"></span>
					<span class="clear"></span>
				</p>
				
				<p class="newadd_zip">
					<span class="newadd_tl fl">邮编</span>
					<span class="newadd_input fl"><input class="" name="zipCode" id="zipCode" type="text"></span>
					<span class="clear"></span>
				</p>
					
				<p class="newadd_add">
					<span class="newadd_tl fl">详细地址</span>
					<%--<select class="newadd_select sel_province fl">
						<option selected="" value="选择省份">选择省份</option>
						<option value="江苏">江苏</option>
						<option value="安徽">安徽</option>
						<option value="浙江">浙江</option>
						<option value="山东">山东</option>
					</select>
					<select class="newadd_select sel_city fl">
						<option selected="" value="选择城市">选择城市</option>
						<option value="南京">南京</option>
						<option value="苏州">苏州</option>
						<option value="无锡">无锡</option>
						<option value="常州">常州</option>
					</select>--%>
					<span class="clear"></span>
				</p>
				
				<div class="newadd_detailadd">
					<textarea class="textarea" name="detailed" id="detailed" onfocus="document.getElementById('newadd_note').style.display='none'" onblur="if(value=='')document.getElementById('newadd_note').style.display='block'"></textarea>
					<div id="newadd_note" class="newadd_note">详细地址</div>
				</div>

			</div><!-- newaddress_txt -->
			
			<div class="saveuse_but">
				<input id="saveusebut" type="submit" value="保存"/></a>
			</div><!-- saveuse_but -->
		</div><!-- newaddress -->
		</form>
	</div><!-- content_wrap -->

	<div class="footer_copyright">
		<p>苏州知行合一网络科技有限公司提供技术支持</p>
	</div><!-- footer_copyright -->
</body>
</html>